package cn.net.xyan.yypt.dto.protal

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement

open class LKAlipayReqHead {
    @JacksonXmlProperty(localName = "AccessToken")
    var accessToken = "DEFA9850-7849-4B02-978D-F38798F0D571"
}

open class LKAlipayReqBody

@JacksonXmlRootElement(localName = "xml")
open class LKAlipayReq<H : LKAlipayReqHead, B : LKAlipayReqBody> {
    var head: H? = null
    var body: B? = null
}


class LKAlipayEmptyBodyReq<H : LKAlipayReqHead> : LKAlipayReq<H, LKAlipayReqBody>()

class LKAlipayQRCode:LKAlipayReqHead() {

    @JacksonXmlProperty(localName = "OutTradeNo")
    var outTradeNo: String? = null

    @JacksonXmlProperty(localName = "TotalAmount")
    var totalAmount: String? = null

    @JacksonXmlProperty(localName = "Caption")
    var caption: String? = null

    @JacksonXmlProperty(localName = "Descriptive")
    var descriptive: String? = null

    @JacksonXmlProperty(localName = "TradeDetail")
    var tradeDetail: String? = null
}

class LKBarcode:LKAlipayReqHead(){
    @JacksonXmlProperty(localName = "OutTradeNo")
    var outTradeNo: String? = null

    @JacksonXmlProperty(localName = "TotalAmount")
    var totalAmount: String? = null

    @JacksonXmlProperty(localName = "AuthCode")
    var authCode: String? = null

    @JacksonXmlProperty(localName = "Subject")
    var subject: String? = null

    @JacksonXmlProperty(localName = "Body")
    var body: String? = null

    @JacksonXmlProperty(localName = "TimeoutExpress")
    var timeoutExpress: String? = null

    @JacksonXmlProperty(localName = "PaymentType")
    var paymentType: String? = null

    @JacksonXmlProperty(localName = "OperatorID")
    var operatorId: String? = null

    @JacksonXmlProperty(localName = "TerminalID")
    var terminalId: String? = null

    @JacksonXmlProperty(localName = "DisablePayChannels")
    var disablePayChannels:String? = null
}

class LKAlipayRefund:LKAlipayReqHead() {

    @JacksonXmlProperty(localName = "TradeNo")
    var tradeNo: String? = null

    @JacksonXmlProperty(localName = "RefundAmount")
    var refundAmount: String? = null

    @JacksonXmlProperty(localName = "OutRequestNo")
    var outRequestNo: String? = null

    @JacksonXmlProperty(localName = "RefundmentReason")
    var refundmentReason: String? = null

    @JacksonXmlProperty(localName = "HospitalID")
    var hospitalID: String? = null

    @JacksonXmlProperty(localName = "TerminalID")
    var terminalID: String? = null
}

class LKAlipayCheck:LKAlipayReqHead() {

    @JacksonXmlProperty(localName = "OutTradeNo")
    var outTradeNo: String? = null

    @JacksonXmlProperty(localName = "TradeNo")
    var tradeNo: String? = null
}